﻿<phone:PhoneApplicationPage 
    x:Class="OttawaTourMap.StopDetailsPage_new"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <controls:Panorama Name="StopDetailPanorama" Title="{Binding Path=Localizedresources.Stop_Details, Source={StaticResource LocalizedStrings}}">
            <controls:Panorama.Background>
                <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                    <GradientStop Color="#FF06151D" Offset="0.181"/>
                    <GradientStop Color="#FF09164B" Offset="1"/>
                </LinearGradientBrush>
            </controls:Panorama.Background>

            <!--Panorama item one-->
            <controls:PanoramaItem Name="Points_Item" Header="{Binding Path=Localizedresources.Points, Source={StaticResource LocalizedStrings}}">
                <Grid x:Name="StopDetailsGrid" Grid.Row="1" Margin="12,0,12,8" DataContext="{Binding}" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <ListBox Name="IntrestListBox" ItemsSource="{Binding StopDetails}" Grid.Row="1" 
                             d:LayoutOverrides="GridBox" Margin="0,0,8,8" SelectionChanged="StopListBox_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Height="199" Margin="0,4,0,0" Orientation="Horizontal" VerticalAlignment="Top">
                                    <Image Margin="5,10,0,10" Width="156" Source="{Binding PointOfInterestImageURI}"/>
                                    <StackPanel Margin="10,8,5,8" Orientation="Vertical" Width="296">
                                        <TextBlock TextWrapping="Wrap" Height="183" Text="{Binding PointOfInterestTitle}" RenderTransformOrigin="0.483,0.75"/>
                                       
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>


                </Grid>
            </controls:PanoramaItem>

            <!--Panorama item two-->
            <controls:PanoramaItem Name="Description_Item" Header="{Binding Path=Localizedresources.Description, Source={StaticResource LocalizedStrings}}">
                <Grid>
                    <ScrollViewer Margin="8">
                        <TextBlock Name="StopDescriptionTextBlock" TextWrapping="Wrap" RenderTransformOrigin="0.347,0.303" Margin="0,0,404,0" Width="396" Height="474"/>
                    </ScrollViewer>
                </Grid>
            </controls:PanoramaItem>
            <controls:PanoramaItem Header="Pictures">
                <Grid Name="picturesGrid" DataContext="{Binding}">
                    <ListBox x:Name="PicturesListBox" ItemsSource="{Binding ImageCollection}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical" Width="412">
                                    <TextBlock Text="{Binding ImageTitle}" Height="32" Margin="8,0" TextWrapping="Wrap" Foreground="#FF03410F"/>
                                    <Image Source="{Binding ImageUri}" Height="378"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>



   

</phone:PhoneApplicationPage>
